package Basic_Search;

import java.util.ArrayList;

public class Demo2 {
    public static void main(String[] args) {
        int []num = {81,4,7,5,101,125,136,81,47,85};
        int n = 81;
        ArrayList<Integer> list = basic_Search(num, n);
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
    }
    public static ArrayList<Integer> basic_Search(int []num,int n){
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < num.length; i++) {
            if(num[i] == n){
                list.add(i);
            }
        }
        return list;
    }
}
